

package com.hazelcast.internal.config;

import com.hazelcast.config.PNCounterConfig;

public class PNCounterConfigReadOnly extends PNCounterConfig {

    public PNCounterConfigReadOnly(PNCounterConfig config) {
        super(config);
    }

    @Override
    public PNCounterConfig setName(String name) {
        throw new UnsupportedOperationException("This config is read-only PN counter: " + getName());
    }

    @Override
    public PNCounterConfig setReplicaCount(int replicaCount) {
        throw new UnsupportedOperationException("This config is read-only PN counter: " + getName());
    }

    @Override
    public PNCounterConfig setSplitBrainProtectionName(String splitBrainProtectionName) {
        throw new UnsupportedOperationException("This config is read-only PN counter: " + getName());
    }

    @Override
    public PNCounterConfig setStatisticsEnabled(boolean statisticsEnabled) {
        throw new UnsupportedOperationException("This config is read-only PN counter: " + getName());
    }
}
